import java.util.ArrayList;

public class Sample {

	private ArrayList<Double> values;
	private String classe;

	public Sample() {
		this.values = new ArrayList<Double>();
	}

	public Sample(int nAttrs) {
		this.values = new ArrayList<Double>(nAttrs);
		for (int i = 0; i < nAttrs; i++) {
			this.values.add(0.0);
		}
	}

	public void addValue(Double value) {
		values.add(value);
	}

	public String getClasse() {
		return classe;
	}

	public void setClasse(String classe) {
		this.classe = classe;
	}

	public ArrayList<Double> getValues() {
		return values;
	}

	public void setValues(ArrayList<Double> values) {
		this.values = values;
	}

	public void setValue(int index, Double value) {
		this.values.set(index, value);
	}

	@Override
	public String toString() {
		StringBuffer buffer = new StringBuffer();

		for (Double value : values) {
			buffer.append(String.format("%f\t", value));
		}

		return buffer.toString();
	}

}
